<div class="head">
    <div class="top">
        <div class="main">
            <span class="left">欢迎光临深圳市临鹏扬三维科技有限公司</span>
            <span class="right" style="padding-left: 30px;"><a href="/data/sitemap.html" style="color: #FFFFFF">网站地图</a></span>
            <span class="right">客服热线：{dede:global.phone/}</span>
        </div>
    </div>
    <div class="menu main">
        <div class="logo"><a href='{dede:global.cfg_cmsurl/}/'><img src="{dede:global.cfg_templets_skin/}/images/logo.png" height="54" width="393"/></a></div>
        <ul id="menu_cate">
            <li><a href='{dede:global.cfg_cmsurl/}/'>主页</a></li>
            {dede:channel type='top' row='5' currentstyle="<li for='cate_~id~' class='on'><a href='~typelink~' ~rel~>~typename~</a></li>"}
            <li for="cate_[field:id/]"><a href='[field:typeurl/]' [field:rel/]>[field:typename/]</a></li>
            {/dede:channel}
        </ul>
    </div>
    <div class="menu_product">
        <div style=" border-bottom: 1px #e0e0e0 solid;height: 25px; width: 100%;"></div>
        <div style="background: #f1f1f1">
            <ul id="cate_30">
                {dede:channelartlist typeid = 30}
                <li><a href="{dede:field name='typeurl'/}" class="publica">{dede:field name='typename'/}</a></li>
                {/dede:channelartlist}
            </ul>
            <ul id="cate_12">
                {dede:arclist row='2' titlelen='100' orderby='pubdate' typeid='12' idlist=''}
                <li><a href="[field:arcurl/]">[field:title /]</a></li>
                {/dede:arclist}
                <li><a href="/a/chenggonganli/">案例展示</a></li>
            </ul>
            <ul id="cate_8">
                {dede:channelartlist typeid = 8}
                <li><a href="{dede:field name='typeurl'/}" class="publica">{dede:field name='typename'/}</a></li>
                {/dede:channelartlist}
            </ul>
            <ul id="cate_16">
                {dede:channelartlist typeid = 16}
                <li><a href="{dede:field name='typeurl'/}" class="publica">{dede:field name='typename'/}</a></li>
                {/dede:channelartlist}
            </ul>
        </div>


    </div>
</div>
<script>
 $(function () {
     var host='{dede:global.cfg_basehost/}/';
     if(host==location.href || host+"index.html"==location.href){
        $("#menu_cate li:eq(0)").addClass("on");
     }
     $(window).scroll(function() {
         var top = $(document).scrollTop();
         if(top>160){
             $(".head").css({"top":"-40px"});
         }else{
             $(".head").css({"top":"0"});
         }
     });
     $("#menu_cate li").hover(
         function () {
             var id=$(this).attr("for");
             $(".menu_product ul").hide();
             $("#"+id).show();
             $("#"+id).parent().parent().show();
         },
         function (e) {
             var x = e.pageX;
             var y = e.pageY;
             //x的值相对于文档的左边缘。y的值相对于文档的上边缘
            //x,y是全局变量;
            //判断鼠标是否在某DIV中
             var div = $('.menu_product');//获取你想要的DIV
             var y1 = div.offset().top;  //div上面两个的点的y值
             var y2 = y1 + div.height();//div下面两个点的y值
             var x1 = div.offset().left;  //div左边两个的点的x值
             var x2 = x1 + div.width();  //div右边两个点的x的值

             if( x < x1 || x > x2 || y < y1 || y > y2){
                 $(".menu_product").hide();
                 $(".menu_product ul").hide();
             }
         }
    );
     $(".menu_product").hover(
         function () {

         },
         function (e) {
             $(".menu_product").hide();
             $(".menu_product ul").hide();
         }
     )

 });
</script>
<div class="mtop"></div>